<!DOCTYPE html>
<html>
<head>
    <title>产品竞拍管理</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <Row :gutter="16">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.name" @on-enter="query" placeholder="产品编号"/>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
            <div class="buttons-group">
                #if($shiro.hasPermission("auction:info"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;查看</i-button>
                #end
                #if($shiro.hasPermission("auction:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("auction:open"))
                <i-button type="success" @click="open"><i class="fa fa-pencil-square-o"></i>&nbsp;开启</i-button>
                #end
                #if($shiro.hasPermission("auction:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("auction:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form ref="formValidate" :model="auction" :rules="ruleValidate" :label-width="100">
            <Form-item label="产品编号" prop="pid">
                <i-input v-model="auction.pid" placeholder="产品编号"/>
            </Form-item>
            <Form-item label="产品名称" prop="pname">
                <i-input v-model="auction.pname" placeholder="产品名称"/>
            </Form-item>
            <Form-item label="押金" prop="deposit">
                <i-input v-model="auction.deposit" placeholder="押金"/>
            </Form-item>
            <Row>
                <i-col span="7">
                    <Form-item label="报名时间" prop="enrollStart">
                        <Date-picker v-model="auction.enrollStart" type="datetime" format="yyyy-MM-dd HH:mm:ss"
                                     placeholder="报名时间"></Date-picker>
                    </Form-item>
                </i-col>
                <i-col span="7">
                    <Form-item label="报名结束时间" prop="enrollEnd">
                        <Date-picker v-model="auction.enrollEnd" type="datetime" format="yyyy-MM-dd HH:mm:ss"
                                     placeholder="报名结束时间"></Date-picker>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="7">
                    <Form-item label="开始时间" prop="beginTime">
                        <Date-picker v-model="auction.beginTime" type="datetime" format="yyyy-MM-dd HH:mm:ss"
                                     placeholder="开始时间"></Date-picker>
                    </Form-item>
                </i-col>
                <i-col span="7">
                    <Form-item label="结束时间" prop="endTime">
                        <Date-picker v-model="auction.endTime" type="datetime" format="yyyy-MM-dd HH:mm:ss"
                                     placeholder="结束时间"></Date-picker>
                    </Form-item>
                </i-col>
            </Row>{{auction.endTime}}
            <Form-item label="起拍价" prop="basePrice">
                <i-input v-model="auction.basePrice" placeholder="起拍价"/>
            </Form-item>
            <Form-item label="封顶价" prop="cappedPrice">
                <i-input v-model="auction.cappedPrice" placeholder="封顶价"/>
            </Form-item>
            <Form-item label="增长倍数" prop="multiple">
                <i-input v-model="auction.multiple" placeholder="增长倍数"/>
            </Form-item>
            <Form-item label="排序" prop="sort">
                <i-input v-model="auction.sort" placeholder="排序"/>
            </Form-item>
            <Form-item label="竞拍状态" prop="statu">
                <Radio-group v-model="auction.statu" placeholder="竞拍状态">
                    <Radio label="0">
                        <span>关闭</span>
                    </Radio>
                    <Radio label="1">
                        <span>开启</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item label="创建时间" prop="createDate">
                <i-input v-model="auction.createDate" placeholder="创建时间"/>
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>
                返回</i-button>
                <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
    </Card>
</div>

<script src="${rc.contextPath}/js/active/auction.js?_${date.systemTime}"></script>
</body>
</html>